package com.woniu.park.controller;

import com.woniu.park.log.SystemControllerLog;
import com.woniu.park.pojo.ParkingState;
import com.woniu.park.service.ParkingStateService;
import com.woniu.park.util.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 张洛诚
 * @date 2019/8/30 11:30:09
 * @description
 */
@RestController
@Api(tags = "车位状态")
public class ParkingStateController {

    @Autowired
    ParkingStateService parkingStateService;

    @SystemControllerLog(description = "查询所有车位状态")
    @ApiOperation(value = "查询所有车位状态", notes = "查询所有车位状态")
    @GetMapping("/getAllParkingState")
    public JsonResult<List> getAllParkingState() {
        List<ParkingState> allParkingState = parkingStateService.getAllParkingState();
        return new JsonResult<List>(allParkingState);
    }
}
